package com.nn.smart.bus.feign;

import com.nn.smart.bus.commons.tools.constant.ServiceConstant;
import com.nn.smart.bus.commons.tools.utils.Result;
import com.nn.smart.bus.dto.UploadToOssDTO;
import com.nn.smart.bus.feign.fallback.OssFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;


/**
 * @author nanning
 */
@FeignClient(name = ServiceConstant.BUS_OSS_SERVER, fallback = OssFeignClientFallback.class)
public interface OssFeignClient {

    /**
     * File文件上传到文件服务器
     *
     * @param dto
     * @return com.nn.smart.bus.commons.tools.utils.Result<java.lang.String>
     * @author nanning
     * @date 2019/9/19 10:15
     */
    @PostMapping(value = "oss/file/uploadFile", consumes = MediaType.APPLICATION_JSON_VALUE)
    Result<String> uploadFile(UploadToOssDTO dto);

}
